drop table jms_dim.dim_rate_order_source_mapping;
CREATE TABLE jms_dim.dim_rate_order_source_mapping
(
    order_source_code varchar(50) comment '订单来源code',
    order_source_name varchar(200) comment '订单来源name',
    date_time         date comment 'sr分区',
    data_type       tinyint comment '1揽收，2规划，3时效签收'
) ENGINE = OLAP DUPLICATE KEY(`order_source_code`)
COMMENT '达成率订单来源维表'
PARTITION BY RANGE(`date_time`)
(START ('2023-08-01') END ('2023-09-30') EVERY (INTERVAL 1 day)
)
DISTRIBUTED BY HASH(`order_source_code`) BUCKETS 1
PROPERTIES (
"replication_num" = "3",
"dynamic_partition.enable" = "true",
"dynamic_partition.time_unit" = "DAY",
"dynamic_partition.time_zone" = "Asia/Shanghai",
"dynamic_partition.start" = "-130",
"dynamic_partition.end" = "3",
"dynamic_partition.prefix" = "p",
"dynamic_partition.buckets" = "1",
"in_memory" = "false",
"storage_format" = "V2"
);